<template>
  <div>
    <el-button ref="aa" @click="fn1">默认按钮</el-button>
    <el-button type="primary">主要按钮</el-button>
    <el-button type="success">成功按钮</el-button>
    <el-button type="info">信息按钮</el-button>
    <el-button type="warning">警告按钮</el-button>
    <button @click="fn2" type="danger">危险按钮</button>
  </div>
</template>

<script>
export default {
  // name:Button,
  data(){
      return {
          aa:'123'
      }
  },
  methods: {
    fn1() {
      this.$refs.aa.$el.style.background = "red";
      console.log(this.$refs.aa.$el);
    },
    fn2() {
      this.$refs.aa.$el.style.background = "red";
      console.log(this.$refs.aa.$el);
    },
  },
};
</script>

<style scoped>
</style>
